import teacher

"""类的继承"""


class EnglishTeacher(teacher.Teacher):
    en_type = ("英式英语", "美式英语")  # 英式英语还是美式英语
    teacher_type = None

    def set_type(self, type):
        self.teacher_type = type

    def format(self):
        """
        重写父类的方法
        :return:
        """
        teacher_desc = super().format()    # 子类中调用父类的方法
        # teacher_desc = teacher.Teacher.format(self)    # 子类中调用父类的方法
        teacher_desc += "\n外语语种：" + self.teacher_type
        return teacher_desc


